package com.codecrane.core.util;

/**
 * 获取货币符号
 */
public enum CountryMoneyEnum {
    US("US", "$"),
    UK("UK", "£"),
    DE("DE", "€"),
    FR("FR", "€"),
    IT("IT", "€"),
    ES("ES", "€"),
    EU("EU", "€"),
    JP("JP", "¥"),
    CA("CA", "$"),
    CN("CN", "¥"),
    AU("AU","$"),
    PKUK("PKUK","£"),

    PL("PL", "$"),
    PKDE("PKDE","€");



    private String code;
    private String msg;

    CountryMoneyEnum(String code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public static String getCountry(String code) {
        for (CountryMoneyEnum countryEnum : CountryMoneyEnum.values()) {
            if (code.equals(countryEnum.getCode())) {
                return countryEnum.getMsg();
            }
        }
        return "";
    }
}
